import request from '@/utils/request'

// 登录
export const login = (params) => {
	return request({
		method: 'POST',
		url: '/login/account',
		data: params
	});
}
// 退出登录
export const logout = (params) => {
	return request({
		method: 'POST',
		url: '/login/logout',
		data: params
	});
}
// 用户信息
export const getUserInfo = (params) => {
	return request({
		method: 'GET',
		url: '/user/info',
		data: params
	});
}
// 编辑管理员信息
export const setUserInfo = (params) => {
	return request({
		method: 'POST',
		url: '/auth.admin/editSelf',
		data: params
	});
}
// 注册
export const register = (params) => {
	return request({
		method: 'POST',
		url: '/login/register',
		data: params
	});
}
// 修改用户信息
export const userUpDate = (params) => {
	return request({
		method: 'POST',
		url: '/user/update',
		data: params
	});
}

// code登录
export const scanLogin = (params) => {
	return request({
		method: 'POST',
		url: '/login/scanLogin',
		data: params
	});
}

// 登录
export const oaLogin = (params) => {
	return request({
		method: 'POST',
		url: '/login/oaLogin',
		data: params
	});
}


// 生成二维码
export const share_img = (params) => {
	return request({
		method: 'GET',
		url: '/index/share_img',
		data: params
	});
}

// 绑定
export const oaAuthBind = (params) => {
	return request({
		method: 'POST',
		url: '/login/oaAuthBind',
		data: params
	});
}
